Allow calling gtk_widget_style_attach() only when realized
authorMichael Natterer <mitch@gimp.org>
Thu, 11 Feb 2010 08:27:05 +0000 (09:27 +0100)
committerMichael Natterer <mitch@gimp.org>
Thu, 11 Feb 2010 08:27:05 +0000 (09:27 +0100)
gtk/gtkwidget.c

index 322ef877f36aae2f74fe3d588c3bb17391877291..a18fc0c259049328ae94b53e000327589d58e30f 100644 (file)
@@ -6409,6 +6409,7 @@ void
 gtk_widget_style_attach (GtkWidget *widget)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_if_fail (GTK_WIDGET_REALIZED (widget));
 
   widget->style = gtk_style_attach (widget->style, widget->window);
 }